home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Leonardo the Inventor
/
Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso
/
LEOWINMV
/
SHARED.DIR
/
03144_Script_PRINT ALL CARDS 1
< prev
next >
Wrap
Text File
|
1996-04-01
|
3KB
|
83 lines
-- -----------------------------------------------------------
-- Handler doPrintAllCards
-- THIS VERSION PRINTS THE FILES USING A REPEAT LOOP AND THE HANDLER
-- getNthFileNameInFolder
--on doPrintAllCards printObj, filePathName
-- printobj(mSetDocumentName, "Leonardo 2")
--
-- -- set up the new object:
-- -- reset to page 1
-- printobj(mreset)
--
-- -- set landscape mode
-- printobj(msetlandscapemode, TRUE)
--
-- set paperwidth = printobj(mgetpaperwidth)
-- set paperheight = printobj(mgetpaperheight)
-- printobj(msetmargins, 0, 0, paperwidth, paperheight)
--
-- -- set the printable space to the margins
-- printobj(msetprintablemargins)
--
-- -- set the margins to as big as possible
-- set pageW = printObj(mGetPageWidth)
-- set pageH = printObj(mGetPageheight)
--
-- -- page footer right side
-- -- printObj(mSetPageNumSymbol,"▐")
-- -- printObj(mSetTextSize,10)
-- -- printObj(mSetTextStyle,"normal")
-- -- printObj(mDrawText, "page ▐", pageW - 10, pageH)
--
-- set pictureFileList = getPictureFileList()
-- set numPictures = count(pictureFileList)
-- set numPages = numPictures / 4
--
-- -- register the xobject
-- printObj(mRegister, "PMAT130-013-01075")
-- -- printObj(mSetProgressPict, the picture of cast 3092)
--
-- repeat with currentPage = 0 to numPages - 1 -- -1 because starting at 0
-- -- start a new page
-- printobj(mnewpage)
--
-- printobj(mpicture, filePathName & getAt(pictureFileList, currentPage * 4 + 1), 0, 0, pageW / 2, (pageH / 2) - 10)
-- printobj(mpicture, filePathName & getAt(pictureFileList, currentPage * 4 + 2), 0, pageH / 2, pageW / 2, pageH - 10)
-- printobj(mpicture, filePathName & getAt(pictureFileList, currentPage * 4 + 3), pageW / 2, 0, pageW, (pageH / 2) - 10)
-- printobj(mpicture, filePathName & getAt(pictureFileList, currentPage * 4 + 4), pageW / 2, pageH / 2, pageW, pageH - 10)
-- -- print the page
-- printobj(mprint)
-- end repeat
--
-- -- set up the last page
-- printobj(mnewpage)
-- printobj(mpicture, filePathName & getAt(pictureFileList, numPictures - 2), 0, 0, pageW / 2, (pageH / 2) - 10)
-- printobj(mpicture, filePathName & getAt(pictureFileList, numPictures - 1), 0, pageH / 2, pageW / 2, pageH - 10)
-- printobj(mpicture, filePathName & getAt(pictureFileList, numPictures), pageW / 2, 0, pageW, (pageH / 2) - 10)
--
-- -- print the last page
-- printobj(mprint)
--
-- -- get rid of the object
-- printobj(mdispose)
--end
--
--on getPictureFileList
-- set fileList = []
-- repeat with i = 1 to the maxInteger
-- put getNthFileNameInFolder(the pathName & "prtPicts", i) into n
-- if n = EMPTY then exit repeat
-- append(fileList, n)
-- end repeat
-- return fileList
--end
on getPictureFileList
set fileList = []
repeat with i = 1 to the maxInteger
put getNthFileNameInFolder(the pathName & "prtPicts", i) into n
if n = EMPTY then exit repeat
append(fileList, n)
end repeat
return fileList
end